<?php

namespace Cms;

class Aboutus {

    static public $table = 'cms_aboutus';

    public function get() {
        return Db()->getRow(static::$table)->result();
    }

    public function set($content) {
        $count = Db()->count(static::$table)->result();
        if ($count) {
            return Db()->update(static::$table, ['content' => $content]);
        } else {
            return Db()->insert(static::$table, ['content' => $content]);
        }
    }

}
